package com.hson.demo.soa.service.remote.activity;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hson.demo.base.remote.hessian.annotations.HessianServer;
import com.hson.demo.soa.dto.activity.TestDTO;
import com.hson.demo.soa.remote.ActivityServiceRemote;
import com.hson.demo.soa.service.thread.ActivityRecordThread;

@Service("activityServiceRemote")
@HessianServer
public class ActivityServiceRemoteImpl implements ActivityServiceRemote {

	@Autowired
	private ActivityRecordThread activityRecordThread;
	
	@Override
	public void luckyDraw() {
		
		System.out.println("其他业务逻辑处理………………………………！！！");
		
		//添加抽奖记录
		// modify by hungel.zou 抽奖记录由线程完成
		TestDTO obj = new TestDTO(new Date(), 0); 
		activityRecordThread.addActivityRecord(obj);
	}

}
